<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
let _value = 1
const getDouble = v => v*2
let double = getDouble(_value)
const count = {
    get value() {
        return _value
    },
    set value(val) {
        _value = val
        double = getDouble(_value)
    }
}
console.log('count', count.value)
console.log('double', double)
console.log('count + 1之后====')
count.value = 2
console.log('count', count.value)
console.log('double', double)
</script>
</html>